package cn.orangeframe.neon.ui.web;

import cn.orangeframe.neon.ui.model.Response;
import cn.orangeframe.neon.ui.model.UserInfo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Collections;

@RestController
@RequestMapping("/user")
public class UserController {

    @GetMapping("/info")
    public Response info() {
        UserInfo userInfo = new UserInfo();
        userInfo.setId(1);
        userInfo.setUsername("admin");
        userInfo.setNickname("超级管理员");
        userInfo.setAvatar("https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png");
        userInfo.setRoles(Collections.singletonList("ADMIN"));
        return Response.success(userInfo);
    }
}
